<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>函数的返回值</title>
</head>
<body>
    <script>
        function zhuzai(){
            let randomNum = Math.random()
            if(randomNum <= 0.9) {
                return '5个钻石'
            } else if(randomNum <= 0.95) {
                return '5个点券'
            } else if(randomNum <= 0.98) {
                return '50点券'
            } else if(randomNum < 1) {
                return '荣耀典藏皮肤'
            }
        }

        let res = zhuzai()
        console.log(res)
    </script>
</body>
</html>